<div id="platform" class="container" style="width:1080px;">
  <!--左侧导航-->
  <div class="col-md-3 menu" ng-include="'pages/menu.html'"></div>
  <!--内容-->
  <div class="col-md-9 col-md-offset-3" style="padding-left: 0;margin-bottom: 15px;">

    <!--按钮操作-->
    <button type="button" class="btn btn-primary" ng-click="deploy()" ng-disabled="isDeploy||checkSpecialBtn()">
      <i class="fa fa-cog fa-spin fa-fw" ng-show="isDeploy"></i>
      {{checkSpecialBtn()?"平台部署（请先执行其他操作中的按钮）":"平台部署"}}
    </button>&nbsp;
    <button type="button" class="btn btn-primary" ng-click="replace()" ng-disabled="isReplace">
      <i class="fa fa-cog fa-spin fa-fw" ng-show="isReplace"></i>数据源替换</button>

    <h4 style="padding-top:10px;">其他操作：</h4>
    <button type="button" class="btn btn-default" ng-repeat="btn in btns" ng-click="doSomething(btn.url)" style="margin-right:8px;">{{btn.name}}</button>

    <h4 style="padding-top:10px;">预览（点击配置项可手动修改）：</h4>
    <div class="list-group config-nav" ng-repeat="(type, files) in types" style="margin-bottom: -1px;">
      <b class="list-group-item title">{{type}}</b>
      <div ng-repeat="(fileName, file) in files">
        <b class="list-group-item title" style="background: #fff; color: #337ab7;cursor: pointer" ng-click="file.isShow=!file.isShow">
          {{fileName}}
          <span class="glyphicon" ng-class="file.isShow?'glyphicon-chevron-up':'glyphicon-chevron-down'" style="float: right;line-height: 1.3"></span>
        </b>
        <ul class="list-group config-nav" style="margin-bottom: -1px;" ng-show="file.isShow">
          <li class="list-group-item platform-config" ng-click="editConfig(type,fileName,key,value)" ng-repeat="(key, value) in file"
            ng-if="key!='isShow'">
            <b style="text-align: right; display: block;word-break: break-all">
              <span style="float: left">{{key}}</span>
              <span style="color: #888">&nbsp;{{value}}</span>
            </b>
          </li>
        </ul>
      </div>
    </div>

  </div>
</div>

<!--上/下一步-->
<!-- <a ng-href="{{isOffline?'#!/dbset':'#!/installInterface'}}" class="step-btn left" data-toggle="tooltip" data-placement="right" -->
<a ng-click="confirmGo(isOffline?'dbset':'installInterface')" class="step-btn left" data-toggle="tooltip" data-placement="right"
  title="返回">
  <i class="iconfont icon-back"></i>
</a>
<a ng-click="confirmGo('done')" class="step-btn right" ng-class="loadingNext?'loading':''" data-toggle="tooltip" data-placement="left"
  title="平台部署">
  <i class="iconfont icon-right text-primary"></i>
</a>

<!--数据源替换Dialog-->
<div class="modal bs-example-modal-lg fade console" id="platform-console" tabindex="-1" role="dialog" data-keyboard="false"
  data-backdrop="static">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">数据源替换提示</h4>
      </div>
      <div class="modal-body" style="font-family: monospace">
        <div class="load-tip" ng-show="!logs||logs.length==0">无日志</div>
        <div class="log-panel" ng-repeat="log in logs track by $index">
          <span class="line-num cantSel">{{($index+1)}}</span>
          <div class="log">{{log}}</div>
        </div>
      </div>
    </div>
  </div>
</div>

<!--修改参数-->
<div class="modal fade" id="platform-edit" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="exampleModalLabel">手动更改配置</h4>
      </div>
      <div class="modal-body">
        <label class="control-label" style="margin-bottom:10px;">{{nowKey}}:</label>
        <textarea style="resize:none;" rows="4" class="form-control" placeholder="点击输入" ng-model="nowValue">
        </textarea>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" ng-click="doChange()">确定</button>
      </div>
    </div>
  </div>
</div>

<!-- 跳转提示 -->
<div class="modal" id="platform-confirm" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="exampleModalLabel">提示</h4>
      </div>
      <div class="modal-body">
        修改后的参数未保存，请点击【平台部署】按钮保存参数，否则参数将会丢失！
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">返回页面</button>
        <button type="button" class="btn btn-default" ng-click="justGo()">忽略修改并下一步</button>
      </div>
    </div>
  </div>
</div>

<!-- 导入内控报表提示 -->
<div class="modal" id="platform-management" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="exampleModalLabel">提示</h4>
      </div>
      <div class="modal-body">
        内控报表未导入，如需导入请返回页面并点击【导入内控报表】按钮
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">返回页面</button>
        <button type="button" class="btn btn-default" ng-click="justGo2('management')">忽略并下一步</button>
      </div>
    </div>
  </div>
</div>

<!-- 导入全面风险报表提示 -->
<div class="modal" id="platform-fsk" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="exampleModalLabel">提示</h4>
      </div>
      <div class="modal-body">
        全面风险报表未导入，如需导入请返回页面并点击【导入全面风险报表】按钮
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">返回页面</button>
        <button type="button" class="btn btn-default" ng-click="justGo2('fsk')">忽略并下一步</button>
      </div>
    </div>
  </div>
</div>